﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace SubstrateHelper.Models
{
   
    public class Process:SequenceBase
    {
     
        [Key]
        public int ProcessID { get; set; }        

        //[Key,Column(Order =0)]
        [Display(Name = "工序名")]
        [Required]
        public string ProcessName { get; set; }


        //[Display(Name = "工序代码，用于产生批号前缀")]
        //[Required]
        //public string ProcessCode { get; set; }       
       
        [Display(Name = "来料名称")]
        [Required]        
        public string InputEntityName { get; set; }


        


        //[Key, Column(Order = 1)]
        [Display(Name = "产出名称")]
        [Required]        
        public string OutputEntityName { get; set; }
        


        


        [Display(Name = "是否废弃")]
        public bool IsDiscarded { get; set; } = false;


        //[Display(Name = "巡检周期（分钟）")]
        //public int InProcessInsepctionMinutes { get; set; } = 240;


        [Display(Name = "工价")]
        public double LaborCost { get; set; }

        [Display(Name = "工价工序系数")]
        public double ProcessLaborRatio { get; set; }


        /// /////////////////////////////////////////////////





        /// <summary>
        /// ：来料或配料单(注：配料单也是一种ProductionEntity)
        /// </summary>

        //public ProductionEntity InputEntity { get; set; }

        
        //public ProductionEntity OutputEntity { get; set; }


        public virtual List<Schedule> Schedules { get; set; }

    }


}
